﻿using System;
using System.Globalization;
using System.Windows.Data;
using System.Windows.Media;
using PairingMatrix.Common;
using PairingMatrix.Common.Enum;

namespace PairingMatrix.View.Converter
{
    public class UrgencyToColorConverter : IValueConverter
    {
        public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
        {
            if(value is Urgency)
            {
                switch ((Urgency)value)
                {
                    case Urgency.NotUrgent: return new SolidColorBrush(Color.FromArgb(255,173,216, 230));
                    case Urgency.Urgent: return new SolidColorBrush(Color.FromArgb(195,255, 178, 48));
                    case Urgency.VeryUrgent: return new SolidColorBrush(Color.FromArgb(158,255,0,0));
                }
            }
            return new SolidColorBrush(Color.FromArgb(173, 216, 230, 255));
        }

        public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
